<extend name="Index/index" />
<block name="nav1">
    <ul class="breadcrumb">
        <li>
            <i class="icon-home home-icon"></i>
            <a href="#">Admin</a>
        </li>
        <li class="active">用户信息管理</li>
    </ul><!-- .breadcrumb -->
</block>

<block name="nav2">
        <h1>
            用户信息管理
        </h1>
</block>
<block name="main">
    <table class="table table-hover mt20">
        <tr>
            <td>用户ID</td>
            <td>用户名</td>
            <td>手机号</td>
            <td>邮箱</td>
            <td>性别</td>
            <td>生日</td>
            <td>头像</td>
            <td>状态</td>
            <td>注册时间</td>
            <td>用户地址</td>
            <td>操作</td>
        </tr>


        <foreach name="list" item="v">
        <tr>
            <td><{$v.id}></td>
            <td><{$v.name}></td>
            <td><{$v.tel}></td>
            <td><{$v.email}></td>
            <td>
                <if condition="$v.sex eq '1'">男
                <else/>女
                </if>
            </td>
            <td><{$v.birthday}></td>
            <empty name="v.icon">
            <td><img src="__UPLOAD__/thumb/1.jpg" /></td>            
            </empty>
            <notempty name="v.icon">
            <td><img src="__UPLOAD__/thumb/100_<{$v.icon}>" /></td>
            </notempty>
            <td>
                <if condition="$v.status eq '1'">激活
                <else/>禁用
                </if>
            </td>
            <td><{$v.regtime}></td>
            <td><{$v.address}></td>
            <td class="col-md-2">
                <!-- 跳转到编辑页面，同时把用户id传过去 -->
                <a href="<{:U('edit',array('id'=>$v['id']))}>" class="btn btn-primary">编辑</a>
                <a href="<{:U('del',array('id'=>$v['id']))}>" class="btn btn-danger">删除</a>
            </td>
        </tr>
        </foreach>
    </table>
    </block>
